import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 高生平
 * Date: 2025-09-05
 * Time: 18:33
 */
public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ret = 1;
        int i = 1;
        int sum = 0;
        while (i <= n) {
            ret *= i;
            sum += ret;
            i++;
        }
        switch (n) {
            case 1:
                System.out.println("1! = " + sum);
                break;
            case 2:
                System.out.println("1! + 2! = " + sum);
                break;
            case 3:
                System.out.println("1! + 2! + 3! = " + sum);
                break;
            case 4:
                System.out.println("1! + 2! + 3! + 4! = " + sum);
                break;
            default:
                System.out.println("1! + 2! + 3! + ... + " + n + "! = " + sum);
        }
    }
}
